import request from '@/utils/request'

const commonApi = {
  updatePassword: '/api/sysusers/postUpdatePassword',
  tree: '/api/sysobject/getTreeDropList',
  role: '/api/sysobject/getDropList',
  parameter: '/api/sys_parameter/getSys_ParameterList',
  parameterInfo: '/api/sys_parameter/getSys_ParameterByID',
  queryParameter: '/api/sys_parameter/judgePmKeyName',
  setParameter: '/api/sys_parameter/Post_SYS_Parameter',
  dropdown: '/api/sysobject/getsysParameterDropList',
  getProposerList: '/api/OAB_Proposer/getProposerList',
  getNewProposerbyID: '/api/OAB_Proposer/getNewProposerbyID',
  getSysModifyLog: '/api/OAB_Proposer/getSysModifyLog',
  getFenHousesDetail: 'api/distributionmanagement/getFenHousesDetail',
  getSysModifyDetailLog: '/api/OAB_Proposer/getSysModifyDetailLog',
  postProposerExamine: '/api/OAB_Proposer/postProposerExamine',
  postYdsb: '/api/ydsb/postYdsb',
  getCityReviewPersonList: '/api/OAB_Proposer/Derp_SJSHRList',
  getHousingEstateList: '/api/houseestate/getHousesList',
  getHousingEstateListDrepQJ: '/api/houseestate/getHousesList_DrepQJ',
  getHouseIdRoof: '/api/OAA_House/getHouseIdRoof',
  getHouseRoofidTotalFloor: '/api/OAA_House/getHouseRoofidTotalFloor',
  getHousesXMList: '/api/houseestate/getHousesXMList',
  getHouseTypeColor: '/api/sysobject/FWFP_DropList',
  getHouseList: '/api/OAA_House//getHouseIDAndRoofidTotalFloor'
}

export function updatePassword (parameter) {
  return request({
    url: commonApi.updatePassword,
    method: 'post',
    data: parameter
  })
}

export function getTreeList (parameter) {
  return request({
    url: commonApi.tree,
    method: 'get',
    params: parameter
  })
}

export function getRoleList (parameter) {
  return request({
    url: commonApi.role,
    method: 'get',
    params: parameter
  })
}

export function getParameterList (parameter) {
  return request({
    url: commonApi.parameter,
    method: 'get',
    params: parameter
  })
}

export function getParameterInfo (parameter) {
  return request({
    url: commonApi.parameterInfo,
    method: 'get',
    params: parameter
  })
}

export function queryParameterName (parameter) {
  return request({
    url: commonApi.queryParameter,
    method: 'get',
    params: parameter
  })
}

export function setParameters (parameter) {
  return request({
    url: commonApi.setParameter,
    method: 'post',
    data: parameter
  })
}

export function getDropdownList (parameter) {
  return request({
    url: commonApi.dropdown,
    method: 'get',
    params: parameter
  })
}

export function getProposerList (parameter) {
  return request({
    url: commonApi.getProposerList,
    method: 'get',
    params: parameter
  })
}

export function getNewProposerbyID (parameter) {
  return request({
    url: commonApi.getNewProposerbyID,
    method: 'get',
    params: parameter
  })
}

export function getSysModifyLog (parameter) {
  return request({
    url: commonApi.getSysModifyLog,
    method: 'get',
    params: parameter
  })
}

export function getSysModifyDetailLog (parameter) {
  return request({
    url: commonApi.getSysModifyDetailLog,
    method: 'get',
    params: parameter
  })
}

export function getFenHousesDetail (parameter) {
  return request({
    url: commonApi.getFenHousesDetail,
    method: 'get',
    params: parameter
  })
}

export function postProposerExamine (parameter) {
  return request({
    url: commonApi.postProposerExamine,
    method: 'post',
    data: parameter
  })
}

export function postYdsb (parameter) {
  return request({
    url: commonApi.postYdsb,
    method: 'post',
    data: parameter
  })
}

export function getCityReviewPersonList (parameter) {
  return request({
    url: commonApi.getCityReviewPersonList,
    method: 'get',
    params: parameter
  })
}

export function getHousingEstateList (parameter) {
  return request({
    url: commonApi.getHousingEstateList,
    method: 'get',
    params: parameter
  })
}

export function getHousingEstateListDrepQJ (parameter) {
  return request({
    url: commonApi.getHousingEstateListDrepQJ,
    method: 'get',
    params: parameter
  })
}

export function getHouseIdRoof (parameter) {
  return request({
    url: commonApi.getHouseIdRoof,
    method: 'get',
    params: parameter
  })
}

export function getHouseRoofidTotalFloor (parameter) {
  return request({
    url: commonApi.getHouseRoofidTotalFloor,
    method: 'get',
    params: parameter
  })
}

export function getHousesXMList (parameter) {
  return request({
    url: commonApi.getHousesXMList,
    method: 'get',
    params: parameter
  })
}

export function getHouseTypeColor (parameter) {
  return request({
    url: commonApi.getHouseTypeColor,
    method: 'get',
    params: parameter
  })
}

export function getHouseList (parameter) {
  return request({
    url: commonApi.getHouseList,
    method: 'get',
    params: parameter
  })
}
